.model  tiny
.386
.code
org     100h

code_begin      label   near
        mov     ah, 9
        mov     dx, offset message
        int     21h
        mov     ah, 4ah
        mov     bx, ((offset code_end - offset code_begin) + 20fh) shr 4
        mov     sp, ((offset code_end - offset code_begin) + 1ffh) and -2
        int     21h
        mov     bx, offset exec_block
        mov     word ptr ds:[bx + 4], cs
        mov     word ptr ds:[bx + 8], cs
        mov     word ptr ds:[bx + 0ch], cs
        mov     ax, 4b01h
        mov     dx, offset antagony_exe
        mov     bp, bx
        int     21h
        mov     ah, 62h
        int     21h
        push    bx
        add     bh, 40h
        mov     ds, bx
        mov     es, bx
        mov     ax, 106ah
        mov     di, 4326h
        stosw
        mov     al, 1fh
        stosb
        mov     cx, 13h
        mov     si, 432ch
        rep     movsb
        mov     ax, 0cc80h
        stosw
        mov     al, 3
        stosb
        pop     ds
        push    ds
        pop     es
        lss     sp, dword ptr cs:[bp + 0eh]
        jmp     small dword ptr cs:[bp + 12h]

antagony_exe    db      "antagony.exe", 0
exec_block      dw      0, 80h, 0, 5ch, 0, 6ch, 0

message         db "DOSBox fix for Antagony", 0dh, 0ah
                db "by Peter Ferrie (peter_ferrie@hotmail.com)", 0dh, 0ah, "$"

code_end        label   near
end             code_begin
